package filters;

import interfaces.IMap;

public class Binarizator implements IFilter
{	
	int LowLevel;
	public Binarizator(int lowLevel)
	{
		LowLevel = lowLevel;
		
	}

	@Override
	public int ApplyFilter(int Px, int Py, IMap map) 
	{
		int cur = (int)(map.Get(Px,Py));
		if(cur<LowLevel)
			return 0;
		return 255;		
	}
	
}
